﻿
Public Class ifelse
    Public Shared Function invoke(ByVal condition As String, ByVal action As String, _
                                  Optional ByVal elseAction As String = Nothing, _
                                  Optional ByRef actionTarget As String = Nothing) As String
        If Not isemptystring(condition) Then
            actionTarget += "if(" + condition + "){" + action + ";}"
            If Not isemptystring(elseAction) Then
                actionTarget += "else{" + elseAction + ";}"
            End If
        End If

        Return actionTarget
    End Function
End Class
